<div style="margin: 15px 0;">

    <?foreach ($this->photos as $photo) :?>
        <?/**@var $photo Application_Model_Photo */?>
        <a class="photo" href="<?=$this->baseUrl()?><?= $photo->getPath(); ?>" rel="trud-service[gallery]">
            <img src="<?=$this->baseUrl()?><?= $photo->getThumbPath()?>" width="180" height="180" alt=""/>
        </a>
    <? endforeach ;?>

</div>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        $("a[rel^='trud-service']").prettyPhoto({"social_tools": ''});
    });
</script>